<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>H+ 登录</title>
    <link rel="shortcut icon" href="../content/static/img/favicon.ico">
    <link href="../content/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="../content/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="../content/static/css/animate.min.css" rel="stylesheet">
    <link href="../content/static/css/style.min.css" rel="stylesheet">
    <link href="../content/static/css/login.min.css" rel="stylesheet">
    <script>
        if(window.top!==window.self){window.top.location=window.location};
    </script>
</head>

<body class="signin">
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-7">
                <div class="signin-info">
                    <div class="logopanel m-b">
                        <h1>[ Psi+ ]</h1>
                    </div>
                    <div class="m-b"></div>
                    <h4>欢迎使用 <strong>进销存后台管理系统</strong></h4>
                    <ul class="m-b">
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势一</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势二</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势三</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势四</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势五</li>
                    </ul>
                </div>
            </div>
            <div class="col-sm-5">
                <form>
                    <h4 class="no-margins">登录：</h4>
                    <p class="m-t-md">登录到Psi+后台</p>
                    <input type="text" class="form-control uname" placeholder="用户名" />
                    <input type="password" class="form-control pword m-b" placeholder="密码" />
                    <a href="">忘记密码了？</a>
                    <a href="javascript:;" class="revision-btn" v-on:click="login()">编辑</a><br />
                    <span id="error" style="color:red"></span>
                </form>
            </div>
        </div>
        <div class="signup-footer">
            <div class="pull-left">
                &copy; 2018 All Rights Reserved. Psi+
            </div>
        </div>
    </div>
</body>
<script src="../content/js/lib/vue/vue.min.js"></script>
<script src="../content/static/js/jquery.min.js?v=2.1.4"></script>
<script src="../content/js/common.js"></script>
<script>
    var vmData = {};
    vmData = $.extend(vmData, baseData);
    var vmMothod = {
        init: function () {},
        login: function () {
            var param={
                account:'admin',
                password:'admin'
            };
            var ajaxParam = {
                url: 'user/login',
                param: param,
                async: false,
                flg:0,
            }
            vm.RequestPostAajx(ajaxParam, function (e) {
                if (e != null && e.status == 200 && e.data && e.data.accessToken) {
                    localStorage.setItem("bearar ", e.data.accessToken);
                    window.location.href = "../../web/index.html";
                } else {
                    $("#error").html("登录失败,请联系管理员");
                }
            });
        },
    };
    vmMothod = $.extend(vmMothod, baseCommonFunction);
    var vm = new Vue({
        el: '.signin',
        data: vmData,
        methods: vmMothod
    });
    vm.init();
</script>

</html>